#ifndef __MESSAGE_H__
#define __MESSAGE_H__
#include <memory>
#include <thread>
#include <string>
#include "Level.hpp"
#include "Utile.hpp"

namespace ssslog
{
    struct Message 
    {
        using ptr = std::shared_ptr<Message>;
        size_t _line;
        size_t _ctime;
        std::thread::id _tid;//线程号
        std::string _name;//日志器名字
        std::string _file;//文件名
        std::string _paymess;//日志消息
        LogLevel::value _level;//日志级别

        Message(std::string& name, std::string file, size_t line, std::string &&paymess, 
        LogLevel::value level)
        :_name(name), _file(file), _paymess(std::move(paymess)), _level(level),_line(line),
        _ctime(Date::Now()), _tid(std::this_thread::get_id())
        {}
    };
}

#endif 